/**
* 功能描述：回到顶部组件样式
* @author jin xiaohang
* @date 2022/10/8 8:55
* @version 1.0
*/

@import "src/style/mixins/index";

//定义普通回到顶部布局
@mixin back-top-layout{
  margin: 0;
  padding: 0;
  line-height: 1.5715;
  list-style: none;
  position: fixed;
  right: 100px;
  bottom: 100px;
  z-index: 10;
  width: 40px;
  height: 40px;

  //回到顶部里层布局
  .#{$namespace}-back-top-inner{
    height: 40px;
    width: 40px;
    line-height: 40px;
    border-radius: 4px;
    text-align: center;
  }
}

//定义图标类型的回到顶部布局
@mixin back-top-icon-layout{
  margin: 0;
  padding: 0;
  line-height: 1.5715;
  position: fixed;
  right: 100px;
  bottom: 50px;
  z-index: 10;
  width: 40px;
  height: 40px;

  //图标类型的回到顶部里层布局
  .#{$namespace}-back-top-content{
    width: 40px;
    height: 40px;
    text-align: center;

    //图标类型的回到顶部图标容器布局
    .#{$namespace}-back-top-icon{
      font-size: 24px;
      line-height: 40px;

      //图标类型的回到顶部图标垂直布局
      .#{$namespace}-back-top-icon-vertical{
        vertical-align: -0.125em;
      }
    }
  }
}




//定义普通回到顶部样式
@include b(back-top){
  color: #000000d9;
  font-size: 14px;
  cursor: pointer;

  //回到顶部里层样式
  .#{$namespace}-back-top-inner{
    background-color: #1088e9;
    color: #fff;
    font-size: 20px;
  }

  //引用布局相关
  @include back-top-layout;
}


//定义图标类型的回到顶部样式
@include b(back-top-icon){
  font-size: 14px;
  cursor: pointer;

  //图标类型的回到顶部里层样式
  .#{$namespace}-back-top-content{
    overflow: hidden;
    color: #fff;
    background-color: #00000073;
    border-radius: 20px;

    &:hover{
      cursor: pointer;
      background-color: #303133;
    }
  }

  //引用布局
  @include back-top-icon-layout;
}